Skip to content

Update EIP-7997: Add EAS-like bytecode + add required EIP#11856

Merged
eth-bot merged 6 commits into
ethereum:masterfrom
jochem-brouwer:factory-contract-sys
Jul 4, 2026
Merged

Update EIP-7997: Add EAS-like bytecode + add required EIP#11856
eth-bot merged 6 commits into
ethereum:masterfrom
jochem-brouwer:factory-contract-sys

Conversation

@jochem-brouwer

@jochem-brouwer jochem-brouwer commented Jul 3, 2026

Copy link
Copy Markdown
Member

This PR adds EAS-like bytecode treating the factory contract as a system contract, equivalent to existing system contract EIPs https://eips.ethereum.org/EIPS/eip-7002 and https://eips.ethereum.org/EIPS/eip-7251 (see "Bytecode")

Code taken from ethereum/sys-asm#51 after @fjl's comment on discord, thanks for that 😄 👍

Since we enforce the irreglar state transition to set the nonce from 0 to 1 in case the nonce of the account is (before transition) 0, which is a result of EIP-161 when created contracts started with nonce 1, not nonce 0.

@jochem-brouwer jochem-brouwer requested a review from eth-bot as a code owner July 3, 2026 02:32
@github-actions github-actions Bot added c-update Modifies an existing proposal s-draft This EIP is a Draft t-core labels Jul 3, 2026
@eth-bot

eth-bot commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

✅ All reviewers have approved.

@eth-bot eth-bot added the a-review Waiting on author to review label Jul 3, 2026
Comment thread EIPS/eip-7997.md
title: Deterministic Factory Contract
description: A minimal `CREATE2` factory shared by EVM chains.
author: Francisco Giordano (@frangio), Toni Wahrstätter (@nerolation), Nick Johnson (@Arachnid)
author: Francisco Giordano (@frangio), Toni Wahrstätter (@nerolation), Nick Johnson (@Arachnid), Jochem Brouwer (@jochem-brouwer)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: adding myself as author here, if this is too much will remove myself.

Comment thread EIPS/eip-7997.md Outdated
category: Core
created: 2025-08-03
requires: 1014
requires: 161, 1014

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EIP-161 is implicitly required because of the hard-enforcement of setting nonce to 1 for the irregular state transition (or at least the result enforces that once the contract is deployed it has nonzero nonce). I assume this is because otherwise, if the nonce is not changed, it could deploy a contract with nonce 0, which would then be a new-ish kind of account which cannot be deployed anymore currently.

Note that prior to EIP-161 (Spurious Dragon) contracts deployed had nonce 0, and those which do not have CREATE/CALLCODE/DELEGATECALL opcodes are (currently) not possible to raise their nonce, so an account of type: "has code, nonce zero" currently exist on Mainnet.

I am actually not sure if we should impose "rules" in this EIP for the state transition. I would argue to simplify this EIP we leave out the irregular state transition in the specification. This EIP, once it is active, enforces that this specific address has this specific bytecode, and nothing more.

If a chain cannot deploy the factory by the keyless transaction and it did not have it in genesis, then this chain itself should come up with a way to add this factory (likely: via an irregular state transition).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this requirement, since this is not directly required by this EIP. The choice for nonce 1 could be considered "inspired" by it, but EIP-161 is definitely not a requirement for this EIP, as the nonce-related specs are self-contained in this EIP (we could also have choosen nonce "2", for instance)

@eth-bot eth-bot enabled auto-merge (squash) July 4, 2026 23:39

@eth-bot eth-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Reviewers Have Approved; Performing Automatic Merge...

@eth-bot eth-bot merged commit d490ca5 into ethereum:master Jul 4, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a-review Waiting on author to review c-update Modifies an existing proposal s-draft This EIP is a Draft t-core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants